package com.tfswue.mxj.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
//标注当前类是一个Controller类，控制层，@RestController注解（返回json数据），@Controller组合
@RestController
@ResponseBody
public class HelloController {
    @Value("${email}")
    private String email;
    @Value("${my1.email}")
    private String my1Email;
    @Value("${city1[0]}")
    private String city1;

    @Value("${sxt[0].mobile}")
    private String mobile;

    @RequestMapping("/hello")
    public String hello() {
        return "hello 玛卡巴卡";
    }
    @RequestMapping("/getvalue")
    public String getvalue() {
        return "city1:" + city1 + "mobile:" + mobile;
    }


    @RequestMapping("/email")
    public String email() {
        return email;
    }
}
